<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>快速入门</title>
    <script src="js/vuejs-2.5.16.js"></script>
    <!-- 导入vue脚本库 -->
    <script src="https://unpkg.com/vue@2/dist/vue.js"></script>
    <!-- 导入element样式库 -->
    <link
      rel="stylesheet"
      href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"
    />

    <!-- 导入element脚本库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  </head>
  <body>
    <div id="app">
      <el-form label-width="120px">
        <el-form-item label="防抖测试">
          <el-input v-model="textContent" @input="handleInput"></el-input>
        </el-form-item>
      </el-form>
      <span>{{lastContent}}</span>
    </div>
  </body>
  <script>
    new Vue({
      el: "#app",
      data: function () {
        return {
          textContent: "",
          lastContent: "",
          // 防抖定时器
          debounceTimer: null,
        };
      },
      methods: {
        debounce(fn, delay) {},
      },
    });
  </script>
</html>
